/**
 * 
 */
package com.gr.staffpm.pages.schedule.model;

import java.io.Serializable;

import org.joda.time.DateTime;


/**
 * @author Graham Rhodes 17 Mar 2011 19:15:09
 */
public class MonthRow implements Serializable {

    private static final long serialVersionUID = 1L;
    private final DateTime day1;
    private final DateTime day2;
    private final DateTime day3;
    private final DateTime day4;
    private final DateTime day5;
    private final DateTime day6;
    private final DateTime day7;

    public MonthRow(DateTime[] days) {
        this.day1 = days[0];
        this.day2 = days[1];
        this.day3 = days[2];
        this.day4 = days[3];
        this.day5 = days[4];
        this.day6 = days[5];
        this.day7 = days[6];
    }

    public DateTime getDay1() {
        return day1;
    }

    public DateTime getDay2() {
        return day2;
    }

    public DateTime getDay3() {
        return day3;
    }

    public DateTime getDay4() {
        return day4;
    }

    public DateTime getDay5() {
        return day5;
    }

    public DateTime getDay6() {
        return day6;
    }

    public DateTime getDay7() {
        return day7;
    }

    public DateTime getDay(int i) {
        assert (i > 0 && i < 8);
        switch (i) {
            case 1:
                return getDay1();
            case 2:
                return getDay2();
            case 3:
                return getDay3();
            case 4:
                return getDay4();
            case 5:
                return getDay5();
            case 6:
                return getDay6();
            case 7:
                return getDay7();
        }
        return getDay1();
    }

}
